package com.ly.demo.controller;

import com.ly.common.core.bean.R;
import com.ly.demo.service.DemoClientService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * 服务端接口提供
 *
 * @author luoyun
 * @Date: 2025/5/19 12:08
 * @Note:
 */
@Slf4j
@RestController
@RequestMapping("/test/api")
@RequiredArgsConstructor
public class TestDemoController {

    private final DemoClientService client;

    @GetMapping("/getMessage")
    public R getMessage(@RequestParam(value = "name", required = false) String name) {
        return client.getMessage(name);
    }
}
